<?php

namespace app\event;

use app\model\CouponOrder;
use Carbon\Carbon;

class CouponOrderUpdate
{


    public $couponOrderArr;


    public $couponOrder;


    public $date;

    /**
     * 暂未启用
     * @param $couponOrderArr
     */
    public function __construct($couponOrderArr)
    {
        $this->couponOrderArr = $couponOrderArr;

        $this->couponOrder = new CouponOrder($couponOrderArr);

        $order_created_at = $this->couponOrder->order_created_at ?? $this->couponOrder->created_at;

        $this->date = Carbon::parse($order_created_at)->format('Y-m-d');

    }

}